getStyleSheets Method |
This method retrieves all the available style sheets.
Syntax
styleID.getStyleSheets(fpCallBack)
Parameters
Parameter |
Description |
---|---|
fpCallBack |
Required. Pointer that specifies the function to call after getting the style sheets. |
Return Value
No return value.
Remarks
The method first starts the style monitor, if it is not started and then retrieves all the available style sheets.
The getStyleSheets() method does not return the style sheets directly as a return value to the function, instead it returns the data as an array to the callback function associated with it. Thus, the StyleSheets array is a parameter of the callback function, which can be used to get the information about all the available style sheets.
Example
The following example shows how this method is used.
<!-- style definition --> <div cordysType="wcp.library.ui.Style" id="style" > ... </div> <!-- Method invocation - Get all the style sheets --> <input type="button" value="Get Style Sheets" onclick="style.getStyleSheets(callBack)"> <!-- Function called --> function callBack(allStyleSheets) { var alertMessage = "All Style Sheets : \n\n"; for (index in allStyleSheets) { alertMessage += "\t" + allStyleSheets[index].name + "\n\n"; } application.notify(alertMessage); }